import excel "C:\Users\Jesse\Box Sync\2018 State Elections Paper\Data\2018 District Level 2012-2018.xlsx", sheet("2018Usable") firstrow

by State, sort : correlate RepPct2018 Trump2016pct if Contested ==1


by State, sort : correlate RepPct2018 Trump2016pct if Contested ==1 & MMDB ==0

import excel "C:\Users\Jesse\Box Sync\2018 State Elections Paper\Data\2018 District Level 2012-2018.xlsx", sheet("2012-2018") firstrow

correlate RepPct2018 Trump2016pct if RepPct2018>0 & DemPct2018>0  & MMDB ==0

correlate RepPct2016 Trump2016pct if RepPct2016>0 & DemPct2016>0  & MMDB ==0

correlate RepPct2016 Romney2012pct if RepPct2016>0 & DemPct2016>0  & MMDB ==0

correlate RepPct2014 Romney2012pct if RepPct2014>0 & DemPct2014>0  & MMDB ==0

correlate RepPct2012 Romney2012pct if RepPct2012>0 & DemPct2012>0  & MMDB ==0



by State, sort : correlate RepPct2018 Trump2016pct if RepPct2018>0 & DemPct2018>0  & MMDB ==0

by State, sort : correlate RepPct2016 Trump2016pct if RepPct2016>0 & DemPct2016>0  & MMDB ==0

by State, sort : correlate RepPct2016 Romney2012pct if RepPct2016>0 & DemPct2016>0  & MMDB ==0

by State, sort : correlate RepPct2014 Romney2012pct if RepPct2014>0 & DemPct2014>0  & MMDB ==0

by State, sort : correlate RepPct2012 Romney2012pct if RepPct2012>0 & DemPct2012>0  & MMDB ==0

DemPct2012 RepPct2012 


DemPct2014 RepPct2014


DemPct2016 RepPct2016
